import request from '@/utils/request'

// 查询蔬菜信息列表
export function listVegetables(query) {
  return request({
    url: '/teahouse/vegetables/list',
    method: 'get',
    params: query
  })
}

// 查询蔬菜信息详细
export function getVegetables(vegetableId) {
  return request({
    url: '/teahouse/vegetables/' + vegetableId,
    method: 'get'
  })
}

// 新增蔬菜信息
export function addVegetables(data) {
  return request({
    url: '/teahouse/vegetables',
    method: 'post',
    data: data
  })
}

// 修改蔬菜信息
export function updateVegetables(data) {
  return request({
    url: '/teahouse/vegetables',
    method: 'put',
    data: data
  })
}

// 删除蔬菜信息
export function delVegetables(vegetableId) {
  return request({
    url: '/teahouse/vegetables/' + vegetableId,
    method: 'delete'
  })
}
